<?php
require_once 'Email.class.php';
require_once '../../_classes/core/facade/AbstractFacade.class.php';

class EmailFacade extends AbstractFacade {
	
	/**
	 * Building Email object
	 * @param $objRequest  Pass $_POST or $_GET or $_REQUEST
	 */
	public static function getObjFromRequest($objRequest){
	    $email = new Email();
		$email->setTo(IEmail::MAIN_EMAIL);
		$email->usePriorityHigh();
		$email->setName($objRequest['name']);
		$email->setFrom($objRequest['email']);
		$email->setSubject($objRequest['subject']);
		$email->setMessage($objRequest['message']);
		return $email;
	}
}
?>
